Is Nearby a Certain Point
Function:
beta_go.stop_point(point,scope,err)
Description: During the movement, Magician Go judges in real time whether it enters the square area centered by a target point. The side length of the square is determined by scope.
- When Magician Go enters the square area, it continues moving; when it is less than err away from the target point, it stops.
- Otherwise, Magician Go will search for the square area centered by the target point (will not implement the next instruction).
Required parameter:
- point: coordinate of the target point (x-axis coordinate, y-axis coordinate)
- scope: parameter of square area, data type: int; range: 15 cm ~ 30 cm; recommended value: 20 cm
- err: distance error; data type: int
- Return:
- True: The command has been finished.
- False: The command has not been finished.
- Example
During the movement, Magician Go judges in real time whether it enters the square area centered by the target point (100, 0). The side length of the square is 40 cm (twice as long as scope). When Magician Go enters the square area, it continues moving until it is less than 2 cm away from the target point.beta_go.stop_point(point=[100, 0], scope=20, err=2)